Method of Preventing TCP-Based Denial-of-Service Attacks on Mobile Devices

ABSTRACT

Provided is a method of preventing a Transmission Control Protocol (TCP)-based Denial of Service (DoS) attack on a mobile device. The method efficiently prevents a DoS attack on a mobile device, which wirelessly and constantly transmits TCP packets to the mobile device using a TCP protocol and thereby exhausts resources of a wireless network and also battery power of the mobile device depending on a battery. An attack conventionally made in a wired network by abusing TCP-based three-way handshaking is more severe in the wireless network of mobile devices. To prevent such an attack on a mobile device, the method capable of checking three-way handshaking and each transition operation makes the mobile device check whether or not a received TCP packet is valid. Therefore, it is possible to efficiently prevent a DoS attack from exhausting wireless resources and battery power of the mobile device.

TECHNICAL FIELD

The present invention relates to a method of preventing a Transmission Control Protocol (TCP)-based Denial of Service (DoS) attack on a mobile device, and more particularly, to a method of efficiently preventing a DoS attack on a mobile device, which wirelessly and constantly transmits TCP packets to the mobile device using a TCP protocol and thereby exhausts resources of a wireless network and battery power of the mobile device depending on a battery.

BACKGROUND ART

In general, as Internet service has been expanded from wired to wireless service, and the types and services of mobile devices have been diversified, users can access the Internet through a mobile device from virtually anywhere.

For this reason, it is expected that service attacks made in the wired network will be gradually expanded to the wireless network. In particular, the attacks may be more severe in the wireless network due to limited resources of the wired network.

FIG. 1 is an overall conceptual diagram for describing a general state transition operation, and illustrates an entire standard finite state machine used to better describe the TCP protocol for establishing and terminating a TCP connection. In FIG. 1, all states and transitions are illustrated for reliability.

First, the TCP connection states are defined below.

LISTEN: a state in which a daemon of a server is executed and waits for a connection request.

SYN_SENT: a state in which a local client application has requested a remote host for connection.

SYN_RCVD: a state in which a server has received a connection request from a remote client, has replied to the client, but has not yet received an acknowledgement message.

ESTABLISHED: a state in which a server and a client are connected with each other after three-way handshaking is completed.

FIN_WAIT_(—)1, CLOSE_WAIT, FIN_WAIT_(—)2: states in which a server requests a client to terminate a connection, receives a reply, and terminates the connection.

CLOSING: an uncommon state in which an acknowledgement message is lost during transfer.

TIME_WAIT: a state in which a socket is open for a while for a slow segment that might have been lost although a connection is terminated.

CLOSED: a state in which a connection is completely terminated.

According to the connection principle of TCP communication that establishes and terminates a TCP connection, as defined in an antecedent document, e.g., Transmission Control Protocol, RFC 793, Jon Postel, DARPA Internet Program Protocol Specification, September 1981, the three-way handshaking procedure must be performed to establish a TCP connection between a client and a server.

More specifically, connection request (synchronous SYN), connection request/acknowledgement (synchronous/acknowledge SYN/ACK), and acknowledgement (acknowledge ACK) packets must be transmitted and received so that a client performs TCP communication with a server.

Here, when the three-way handshaking procedure of connection request SYN, connection request/acknowledge SYN/ACK, and acknowledge ACK is successively performed, a TCP connection is established between the client and the server, which means that a TCP communication port of the server requested by the client is open for communication.

Such a conventional TCP state transition shows what state of a TCP stack the TCP state transition is in according to the flag of a packet. However, according to conventional TCP state transition, an incoming packet is not thoroughly verified, and thus abuse of such vulnerability frequently occurs.

In other words, an attack abusing the three-way handshaking procedure, e.g., a DoS attack such as SYN flooding, can be made through the Internet.

Meanwhile, the entire above-described TCP state transition may or may not be supported according to an operating system installed in a mobile device. In an initial three-way handshaking step, there is no checking process for performing the entire TCP state transition suggested by the TCP specification. Therefore, when a network connection is attempted by a SYN flooding attack frequently used as a TCP-based DoS attack upon a mobile device that is mostly in a dormant state to save energy, the mobile device switches to an awake state and consumes energy.

In addition, even though a packet transmitted to a mobile device is for no useful reason, it may constantly attempt a connection to the mobile device and awake the same. In this case, resources of a wireless line are occupied, and also battery power of the mobile device is wasted.

DISCLOSURE OF INVENTION Technical Problem

The present invention is directed to a method of efficiently preventing a Denial of Service (DoS) attack on a mobile device, which wirelessly and constantly transmits Transmission Control Protocol (TCP) packets to the mobile device using a TCP protocol and thereby exhausts resources of a wireless network and also battery power of the mobile device depending on a battery.

Technical Solution

A first aspect of the present invention provides a method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile device using a Transmission Control Protocol (TCP) protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; when the transmitted connection request acknowledgement SYN/ACK_(—)1 packet is received, transmitting, at the base station, an acknowledgement ACK_(—)2 packet corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet to the mobile device; when the mobile device receives the transmitted acknowledgement ACK_(—)2 packet, establishing the TCP connection; and when the TCP connection is established, and then the mobile device receives a packet, in which a reset RST or connection request SYN flag is set, transmitted from the base station, terminating the established TCP connection.

Here, when the TCP connection is established, and then the mobile device cannot receive any packet during a previously set timeout period, it may be determined that the base station has abnormally terminated the TCP connection, and the mobile device may safely terminate the TCP connection.

The timeout period may be set to 0.5 seconds.

A second aspect of the present invention provides a method of preventing a DoS attack by checking flow of packets transmitted between a base station and a mobile device using a TCP protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then transmitting a finish FIN packet to the mobile device; and when the mobile device receives the transmitted finish FIN packet, terminating the TCP connection.

A third aspect of the present invention provides a method of preventing a DoS attack by checking flow of packets transmitted between a base station and a mobile device using a TCP protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then transmitting an acknowledgement finish ACK_(—)2/FIN packet, in which an acknowledgement ACK_(—)2 flag corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet and a FIN flag are set, to the mobile device; and when the mobile device receives the transmitted acknowledgement finish ACK_(—)2/FIN packet, terminating the TCP connection.

A fourth aspect of the present invention provides a method of preventing a DoS attack by checking flow of packets transmitted between a base station and a mobile device using a TCP protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then retransmitting the connection request SYN packet to the mobile device; and when the mobile device receives the retransmitted connection request SYN packet, terminating the TCP connection.

Here, when the mobile device cannot receive any packet during a previously set timeout period after transmitting the connection request acknowledgement SYN/ACK_(—)1 packet to the base station, it may be determined that the base station has abnormally terminated the TCP connection, and the mobile device may safely terminate the TCP connection.

The timeout period may be set to 0.5 seconds.

A fifth aspect of the present invention provides a method of preventing a DoS attack by checking flow of packets transmitted between a base station and a mobile device using a TCP protocol, the method comprising the step of: safely terminating a TCP connection when, after the TCP connection is established between the base station and the mobile device, the mobile device transmits a finish/acknowledgement FIN/ACK packet for normally terminating the TCP connection to the base station and then cannot receive an acknowledgement ACK_(—)3 packet from the base station during a previously set timeout period.

Here, the timeout period may be set to 0.5 seconds.

A sixth aspect of the present invention provides a recording medium storing a program for executing the above-described method of preventing a TCP-based DoS attack on a mobile device.

ADVANTAGEOUS EFFECTS

According to the inventive method of preventing a Transmission Control Protocol (TCP)-based Denial of Service (DoS) attack on a mobile device, it is possible to prevent a DoS attack from wasting wireless resources and battery power of the mobile device. In addition, when a connection is attempted through a wireless network by a DoS attack, it is possible to safely protect the mobile device at an early stage.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an overall conceptual diagram for describing a general state transition operation;

FIG. 2 is an overall conceptual diagram of a model for implementing a method of preventing a Transmission Control Protocol (TCP)-based Denial of Service (DoS) attack on a mobile device according to an exemplary embodiment of the present invention;

FIG. 3 illustrates the flow of packets and TCP state transition operations in a process of normally establishing a TCP connection between a base station and a mobile device;

FIG. 4 illustrates the flow of packets and TCP state transition operations in a process of normally terminating a TCP connection between a base station and a mobile device;

FIG. 5 illustrates the flow of packets and TCP state transition operations in a first example of an abnormal TCP connection;

FIG. 6 illustrates the flow of packets and TCP state transition operations in a second example of an abnormal TCP connection;

FIG. 7 illustrates the flow of packets and TCP state transition operations in a third example of an abnormal TCP connection;

FIG. 8 illustrates the flow of packets and TCP state transition operations in a fourth example of an abnormal TCP connection; and

FIG. 9 illustrates the flow of packets and TCP state transition operations in a fifth example of an abnormal TCP connection.

MODE FOR THE INVENTION

Hereinafter, exemplary embodiments of the present invention will be described in detail. However, the present invention is not limited to the exemplary embodiments disclosed below and can be implemented in various modified forms. The present exemplary embodiments are provided to enable one of ordinary skill in the art to embody and practice the invention.

First, the present invention can be applied to any case in which a mobile device supplied with power from a battery wirelessly receives Transmission Control Protocol (TCP) packets and thereby receives service. The present invention is a protection means that can be applied to a mobile device, a smart phone, etc., using, for example, a Web Personal Digital Assistant (PDA), a second generation (2G)-Evolution-Data Optimized (EVDO) cellular network, a 3G/4G data service cellular network, etc., capable of receiving TCP service outside the field of sensor network for which a protocol has not yet determined.

In addition, the present invention is implemented in a mobile device and checks and processes resource-consuming TCP packets. Therefore, the present invention is a method of efficiently managing wireless resources and the mobile device's resources, and also can be used as a method of safely protecting the mobile device when a connection is attempted through a wireless network by a Denial of Service (DoS) attack.

FIG. 2 is an overall conceptual diagram of a model for implementing a method of preventing a TCP-based DoS attack on a mobile device according to an exemplary embodiment of the present invention.

Referring to FIG. 2, the entire model for implementing a method of preventing a TCP-based DoS attack on a mobile device according to an exemplary embodiment of the present invention consists of 5 states 0 to 4, and the 5 states are connected in various forms according to the flow of packets transmitted/received between a base station and the mobile device, e.g., a cellular phone, a PDA, a WebPDA, another wireless mobile device capable of supporting TCP networking, and so on.

Meanwhile, the model applied to an exemplary embodiment of the present invention checks and determines whether or not a packet transmitted and received for TCP state transition conforms to a TCP specification while monitoring packets transmitted and received between the base station and the mobile device.

In other words, the present invention performs a conventional checking function according to TCP state transition. Therefore, in each step, it is possible to check what state will be next according to the flag of a transmitted and received packet, and what flag must be set in a received packet in a current state.

In addition, according to all packets input to the mobile device, one session goes through the first state 0 to the fifth state 4 and returns to the first state 0. Using the flags of packets constituting the session, it is possible to check the order of the steps 0 to 4 and whether a packet that should not be input is received. Here, the first state 0 indicates the start and end of one session.

FIG. 3 illustrates the flow of packets and TCP state transition operations in a process of normally establishing a TCP connection between a base station and a mobile device.

Referring to FIGS. 2 and 3, when a session is first established between a base station 100 and a mobile device 200, the TCP state of the mobile device 200 is set to the first state 0, which indicates the start and end of one session.

Subsequently, the base station 100 transmits a connection request SYN packet, in which a SYN flag is set, to a specific port of the mobile device 200 desired to connect thereto. When the mobile device 200 checks the reception of the connection request SYN packet transmitted from the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the first state 0 to the second state 1.

Then, the mobile device 200 transmits a connection request acknowledgement SYN/ACK_(—)1 packet, in which a connection request SYN flag and an acknowledgement ACK_(—)1 flag of the mobile device 200 are set, to the base station 100 in the way of accepting the connection request. When the mobile device 200 checks the transmission of the connection request acknowledgement SYN/ACK_(—)1 packet to the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the second state 1 to the third state 2.

Subsequently, the base station 100 transmits an acknowledgement ACK_(—)2 packet corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet to the mobile device 200. When the mobile device 200 checks the reception of the acknowledgement ACK_(—)2 packet transmitted from the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the third state 2 to the fourth state 3, thereby establishing a TCP connection. After this, data transmission may be performed between the base station 100 and the mobile device 200.

When the TCP connection is initially attempted, a TCP packet received by the mobile device 200 must be the connection request SYN packet. Through three-way handshaking, the TCP connection with a node to which the TCP connection was attempted is established.

Therefore, in response to the connection request SYN packet, the mobile device 200 transmits the connection request acknowledgement SYN/ACK_(—)1 packet and receives the acknowledgement ACK_(—)2 packet as a reply to the connection request acknowledgement SYN/ACK_(—)1 packet. When the process is completely performed, one TCP connection is established.

The present invention provides pointers to the steps of the first state 0 to the fourth state 3 so that the mobile device 200 can check each step for establishing a TCP connection one by one. Because a pointer exists in each step since the connection request SYN packet initially attempts the TCP connection until three-way handshaking is completed, it is possible to immediately catch a moment that the process is abnormally performed and also appropriately cope with the malfunction.

FIG. 4 illustrates the flow of packets and TCP state transition operations in a process of normally terminating a TCP connection between a base station and a mobile device.

Referring to FIGS. 2 and 4, in the fourth state 3 in which a TCP connection is established between the base station 100 and the mobile device 200, the mobile device 200 transmits a finish acknowledgement FIN/ACK_(—)3 packet, in which a FIN flag is set, to a specific port of the base station 100 in order to terminate the TCP connection with the base station 100. When the finish acknowledgement FIN/ACK_(—)3 packet transmitted from the mobile device 200 is received, the base station 100 transmits an acknowledgement ACK_(—)4 packet, corresponding to the finish acknowledgement FIN/ACK_(—)3 packet, to the mobile device 200 to inform that termination of the TCP connection is recognized.

Here, when the mobile device 200 checks the transmission of the finish acknowledgement FIN/ACK_(—)3 packet to the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the fourth state 3 to the fifth state 4.

Subsequently, the base station 100 transmits the acknowledgement ACK_(—)4 packet corresponding to the finish acknowledgement FIN/ACK_(—)3 packet. When the mobile device 200 checks the reception of the acknowledgement ACK_(—)4 packet transmitted from the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the fifth state 4 to the first state 0, thereby terminating the TCP connection.

Meanwhile, when the base station 100 previously terminates the connection without transmitting the acknowledgement ACK_(—)4 packet in the fifth state 4, a timeout is triggered, and the mobile device 200 also switches to the first state 0 in order to terminate the TCP connection.

In other words, when the mobile device 200 cannot receive the acknowledgement ACK_(—)4 packet during a previously set timeout period, which may be about 0.5 seconds, the TCP state of the mobile device 200 changes from the fifth state 4 to the first state 0, thereby safely terminating the TCP connection.

A method of preventing a TCP-based DoS attack on a mobile device according to an exemplary embodiment of the present invention will be described in detail below with reference to several examples of an abnormal TCP connection.

In other words, it is described how the mobile device 200 can check and cope with a DoS attack using the model applied to the present invention when DoS attacks are made. Most DoS attacks that the mobile device 200 can cope with make an abnormal attempt to establish a TCP connection.

FIG. 5 illustrates the flow of packets and TCP state transition operations in a first example of an abnormal TCP connection.

Referring to FIGS. 2 and 5, when the mobile device 200 checks the reception of a connection request SYN packet transmitted from the base station 100, the TCP state of the mobile device 200 changes from the first state 0 to the second state 1. And then, when the mobile device 200 checks the transmission of a connection request acknowledgement SYN/ACK_(—)1 packet to the base station 100, the TCP state of the mobile device 200 changes from the second state 1 to the third state 2.

Subsequently, when the mobile device 200 checks the reception of an acknowledgement ACK_(—)2 packet transmitted from the base station 100, the TCP state of the mobile device 200 changes from the third state 2 to the fourth state 3, thereby establishing a TCP connection.

After this, when the mobile device 200 checks the reception of a packet, in which a reset RST or connection request SYN flag is set, i.e., the connection request packet, transmitted from the base station 100, the TCP state of the mobile device 200 changes from the fourth state 3 directly to the first state 0, thereby safely terminating the TCP connection.

Meanwhile, when the base station 100 abnormally terminates the connection without transmitting any packet in the fourth state 3, a timeout is triggered according to the present invention, and the mobile device 200 directly switches to the first state 0 in order to terminate the TCP connection.

In other words, when the mobile device 200 cannot receive any packet during a previously set timeout period, which may be about 0.5 seconds, the TCP state of the mobile device 200 changes from the fourth state 3 directly to the first state 0, thereby safely terminating the TCP connection.

After considering all the descriptions in the first example of an abnormal TCP connection, a case frequently occurs in which the connection request SYN packet is constantly transmitted to the mobile device 200 in a wireless network. In this case, resources of the wireless network are wasted, and the mobile device 200 is kept in an awake state and consumes battery power.

Therefore, when a reset RST or connection request SYN packet is input after three-way handshaking, the packet is considered as an abnormal packet. Then, the mobile device 200 switches from the first state 0 to the fourth state 3 sequentially as described above and then switches back to the first state 0, thereby not receiving the packet.

FIG. 6 illustrates the flow of packets and TCP state transition operations in a second example of an abnormal TCP connection.

Referring to FIGS. 2 and 6, when the mobile device 200 checks the reception of a connection request SYN packet transmitted from the base station 100, the TCP state of the mobile device 200 changes from the first state 0 to the second state 1. And then, when the mobile device 200 checks the transmission of a connection request acknowledgement SYN/ACK_(—)1 packet to the base station 100, the TCP state of the mobile device 200 changes from the second state 1 to the third state 2.

Subsequently, when the mobile device 200 receives a finish FIN packet transmitted from the base station 100, it is determined that the base station 100 has abnormally terminated the connection, and the TCP state of the mobile device 200 changes from the third state 2 directly to the first state 0, thereby safely terminating the TCP connection.

Meanwhile, when the base station 100 abnormally terminates the connection without transmitting any packet in the third state 2, a timeout is triggered, and the mobile device 200 also switches directly to the first state 0 in order to terminate the TCP connection.

In other words, when the mobile device 200 cannot receive any packet during a previously set timeout period, which may be about 0.5 seconds, the TCP state of the mobile device 200 changes from the third state 2 directly to the first state 0, thereby safely terminating the TCP connection.

After considering all the descriptions in the second example of an abnormal TCP connection, a case occurs in which the finish FIN packet is unexpectedly received during the three-way handshaking procedure. In other words, an operating system in the mobile device 200 waits for an acknowledgement ACK_(—)2 packet to finish the three-way handshaking procedure.

However, when the unexpected finish FIN packet is received from the base station 100, the mobile device 200 constantly waits in the awake state and consumes battery power. Therefore, in this case, the mobile device 200 switches from the first state 0 to the third state 2 sequentially, and switches back to the first state 0, thereby terminating the TCP connection to prevent the waste of resources.

In other words, when it is confirmed that the TCP state of the mobile device 200 changes from the first state 0 to the third state 2 sequentially and changes back to the first state 0, and then the TCP connection is terminated, it is possible to solve the problems of battery consumption and resource allocation.

FIG. 7 illustrates the flow of packets and TCP state transition operations in a third example of an abnormal TCP connection.

Referring to FIGS. 2 and 7, a case is illustrated in which a finish FIN packet is transmitted while completing three-way handshaking. First, when the mobile device 200 checks the reception of a connection request SYN packet transmitted from the base station 100, the TCP state of the mobile device 200 changes from the first state 0 to the second state 1. And then, when the mobile device 200 checks the transmission of a connection request acknowledgement SYN/ACK_(—)1 packet to the base station 100, the TCP state of the mobile device 200 changes from the second state 1 to the third state 2.

Subsequently, the base station 100 may transmit to the mobile device 200 an acknowledgement finish ACK_(—)2/FIN packet, in which an acknowledgement ACK_(—)2 flag corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet and a FIN flag are set. When the mobile device 200 checks the reception of the acknowledgement finish ACK_(—)2/FIN packet transmitted from the base station 100 according to the present invention, the TCP state of the mobile device 200 changes from the third state 2 directly to the first state 0, thereby safely terminating the TCP connection.

Meanwhile, when the base station 100 abnormally terminates the connection without transmitting any packet in the third state 2, a timeout is triggered according to the present invention, and the mobile device 200 also switches directly to the first state 0 in order to terminate the TCP connection.

In other words, when the mobile device 200 cannot receive any packet during a previously set timeout period, which may be about 0.5 seconds, the TCP state of the mobile device 200 changes from the third state 2 directly to the first state 0, thereby safely terminating the TCP connection.

FIG. 8 illustrates the flow of packets and TCP state transition operations in a fourth example of an abnormal TCP connection.

Referring to FIGS. 2 and 8, when the mobile device 200 checks the reception of a connection request SYN packet transmitted from the base station 100, the TCP state of the mobile device 200 changes from the first state 0 to the second state 1. And then, when the mobile device 200 checks the transmission of a connection request acknowledgement SYN/ACK_(—)1 packet to the base station 100, the TCP state of the mobile device 200 changes from the second state 1 to the third state 2.

Here, the same base station 100 may continuously transmit the same connection request SYN packet to the mobile device 200 in the third state 2. When the mobile device 200 checks the reception of the connection request SYN packet from the same base station 100, the TCP state of the mobile device 200 changes from the third state 2 directly to the first state 0, thereby safely terminating the TCP connection.

After considering all the descriptions in the fourth example of an abnormal TCP connection, a case occurs in which the same connection request SYN packet is continuously transmitted during three-way handshaking. In this case, the connection request SYN packet is continuously transmitted to keep the mobile device 200 in the awake state. Here, according to the method of the present invention, the mobile device 200 switches from the first state 0 to the third state 2 sequentially, and then switches back to the first state 0 when receiving the same connection request SYN packet, thereby safely terminating the TCP connection. Thus, it is possible to efficiently prevent wireless resources and battery power of the mobile device 200 from being wasted.

FIG. 9 illustrates the flow of packets and TCP state transition operations in a fifth example of an abnormal TCP connection. In the fifth example, a timeout is triggered.

Referring to FIGS. 2 and 9, when the mobile device 200 wants to terminate a TCP connection after the TCP connection is established between the base station 100 and the mobile device 200, i.e., in the fourth state 3, the mobile device 200 switches from the fourth state 3 to the fifth state 4 and waits for an acknowledgement ACK_(—)2 packet from the base station 100 after transmitting a finish acknowledgement FIN/ACK_(—)1 packet to the base station 100. Here, when there is no reply during a previously set timeout period, which may be about 0.5 seconds, the TCP state of the mobile device 200 changes from the fifth state 4 directly to the first state 0, thereby safely terminating the TCP connection.

Meanwhile, the method of preventing a TCP-based DoS attack on a mobile device according to an exemplary embodiment of the present invention can be stored in a computer-readable recording medium using a computer code. The computer-readable recording medium may be any recordable device storing data that can be read by a computer system.

For example, the computer-readable recording medium may be a read-only memory (ROM), a random-access memory (RAM), a compact disk read-only memory (CD-ROM), a magnetic tape, a hard disk, a floppy disk, a mobile storage device, a nonvolatile memory (flash memory), an optical data storage device, and so on. Also, the recording medium may be carrier waves, e.g., transmission over the Internet.

In addition, the computer-readable recording medium may be distributed among computer systems connected via a communication network and stored in the form of a code that can be read and executed by a de-centralized method.

While the invention has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. 

1. A method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile station using a Transmission Control Protocol (TCP) protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile station, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; when the transmitted connection request acknowledgement SYN/ACK_(—)1 packet is received, transmitting, at the base station, an acknowledgement ACK_(—)2 packet corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet to the mobile device; when the mobile device receives the transmitted acknowledgement ACK_(—)2 packet, establishing the TCP connection; and when the TCP connection is established, and then the mobile device receives a packet, in which a reset RST or connection request SYN flag is set, transmitted from the base station, terminating the established TCP connection.
 2. The method according to claim 1, wherein when the TCP connection is established, and then the mobile device cannot receive any packet during a previously set timeout period, it is determined that the base station has abnormally terminated the TCP connection, and the mobile device safely terminates the TCP connection.
 3. The method according to claim 2, wherein the timeout period is set to 0.5 seconds.
 4. A method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile station using a Transmission Control Protocol (TCP) protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then transmitting a finish FIN packet to the mobile device; and when the mobile device receives the transmitted finish FIN packet, terminating the TCP connection.
 5. A method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile station using a Transmission Control Protocol (TCP) protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then transmitting an acknowledgement finish ACK_(—)2/FIN packet, in which an acknowledgement ACK_(—)2 flag corresponding to the connection request acknowledgement SYN/ACK_(—)1 packet and a FIN flag are set, to the mobile device; and when the mobile device receives the transmitted acknowledgement finish ACK_(—)2/FIN packet, terminating the TCP connection.
 6. A method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile station using a Transmission Control Protocol (TCP) protocol, the method comprising the steps of: when the base station transmits a connection request SYN packet for a TCP connection to the mobile device, and then the mobile device receives the transmitted connection request SYN packet, transmitting, at the mobile device, a connection request acknowledgement SYN/ACK_(—)1 packet to the base station; receiving, at the base station, the transmitted connection request acknowledgement SYN/ACK_(—)1 packet and then retransmitting the connection request SYN packet to the mobile device; and when the mobile device receives the retransmitted connection request SYN packet, terminating the TCP connection.
 7. The method according to claim 4, wherein when the mobile device cannot receive any packet during a previously set timeout period after transmitting the connection request acknowledgement SYN/ACK_(—)1 packet to the base station, it is determined that the base station has abnormally terminated the TCP connection, and the mobile device safely terminates the TCP connection.
 8. The method according to claim 7, wherein the timeout period is set to 0.5 seconds.
 9. A method of preventing a Denial of Service (DoS) attack by checking flow of packets transmitted between a base station and a mobile station using a Transmission Control Protocol (TCP) protocol, the method comprising the step of: safely terminating a TCP connection when, after the TCP connection is established between the base station and the mobile device, the mobile device transmits a finish/acknowledgement FIN/ACK packet for normally terminating the TCP connection to the base station and then cannot receive an acknowledgement ACK_(—)3 packet from the base station during a previously set timeout period.
 10. The method according to claim 9, wherein the timeout period is set to 0.5 seconds.
 11. A computer-readable recording medium storing a computer program capable of executing the method according to claim
 1. 12. A computer-readable recording medium storing a computer program capable of executing the method according to claim
 4. 13. A computer-readable recording medium storing a computer program capable of executing the method according to claim
 5. 14. A computer-readable recording medium storing a computer program capable of executing the method according to claim
 6. 15. A computer-readable recording medium storing a computer program capable of executing the method according to claim
 9. 16. The method according to claim 5, wherein when the mobile device cannot receive any packet during a previously set timeout period after transmitting the connection request acknowledgement SYN/ACK_(—)1 packet to the base station, it is determined that the base station has abnormally terminated the TCP connection, and the mobile device safely terminates the TCP connection.
 17. The method according to claim 16, wherein the timeout period is set to 0.5 seconds.
 18. The method according to claim 6, wherein when the mobile device cannot receive any packet during a previously set timeout period after transmitting the connection request acknowledgement SYN/ACK_(—)1 packet to the base station, it is determined that the base station has abnormally terminated the TCP connection, and the mobile device safely terminates the TCP connection.
 19. The method according to claim 18, wherein the timeout period is set to 0.5 seconds. 